﻿#pragma once
#include "AsGraphicsBasic3D.h"

namespace AsPrivate { class AsGraphicsSurface3D; };

namespace AsGraphicsNamespace {

	class AS_GRAPHICS_EXPORT AsGraphicsSurface3D : public QObject {
	public:
		AsGraphicsSurface3D(QWidget* container);
		~AsGraphicsSurface3D();

	private:
		AsPrivate::AsGraphicsSurface3D* mp;

	public:
		void setDatas(const QVector<QVector<QVector3D>>& datas);

	public:
		void setTheme(Theme3D::Enum theme);
		void setSpaceColor(const QColor& color);
		void setAxisWallColor(const QColor& color);
		void setGridLineColor(const QColor& color);
		void setLabelTextColor(const QColor& color);
		void setLabelBackgoundColor(const QColor& color);
		void setBaseGradient(Gradient3D::Enum gradient);
		void setBaseGradient(const QLinearGradient& gr);
		void setXRange(double min = AutoAdjust, double max = AutoAdjust);
		void setYRange(double min = AutoAdjust, double max = AutoAdjust);
		void setZRange(double min = AutoAdjust, double max = AutoAdjust);
		void setXLabelFormat(LabelFormat::Enum format);
		void setYLabelFormat(LabelFormat::Enum format);
		void setZLabelFormat(LabelFormat::Enum format);
		void setAxisLabelFormat(LabelFormat::Enum format);

		void setEnable_ShowAxisWall(bool isEnable);
		void setEnable_ShowGridLine(bool isEnable);
		void setEnable_ShowLabelBorder(bool isEnable);
		void setEnable_DrawWireframe(bool isEnable);

	public:
		QLinearGradient getBaseGradient() const;

	};

	typedef AsGraphicsSurface3D Surface3D;
};
